export const formatTimestamp = (timestamp: number) => {
  const date = new Date(timestamp);

  const year = date.getFullYear();
  const month = (date.getMonth() + 1).toString().padStart(2, "0"); // 月份从0开始，需要加1，并且确保是两位数
  const day = date.getDate().toString().padStart(2, "0"); // 确保是两位数的日期
  const hours = date.getHours().toString().padStart(2, "0"); // 确保是两位数的小时
  const minutes = date.getMinutes().toString().padStart(2, "0"); // 确保是两位数的分钟

  return `${year}-${month}-${day} ${hours}:${minutes}`;
};
